1. Field of the Invention
The invention relates to data communications, and more particularly, to fragmenting an incoming packet for inclusion in a first outgoing packet and a second outgoing packet.
2. Description of the Prior Art
As stated in Requests for Comments (RFC) document number 2516, which is incorporated herein by reference, modern access technologies are faced with several conflicting goals. It is desirable to connect multiple hosts at a remote site through the same customer premise access device. It is also a goal to provide access control and billing functionality in a manner similar to dial-up services using Point to Point Protocol (PPP).
FIG. 1 shows a typical distribution of Asynchronous Digital Subscriber Line (ADSL) broadband access to multiple hosts through a single customer premise access device. An ADSL modem 102 of a service provider 104 is connected to a client-side ADSL modem 106 at a particular location through a telephone connection 107, which is typically implemented as twisted pair telephone wire. As an example, FIG. 1 shows that the particular location has two separate customers. A first customer 108 and a second customer 110 both receive broadband connectivity from the client-side ADSL modem 106. The client-side ADSL modem 106 is a single customer premise access device, which provides access to the first customer 108 through a first gateway 112 and to the second customer 110 through a second gateway 114. The first customer 108 has an internal Ethernet network 116, and the second customer 110 has an internal Ethernet network 118.
By using Point to Point Protocol over Ethernet (PPPoE) between the client-side ADSL modem 106 and the first and second gateways 112, 114, the service provider 104 is able to do access control, billing, and type of service adjustments on a per-customer, rather than a per-location, basis. However, the PPPoE connection between the client-side ADSL modem 106 and the first and second gateways 112, 114 also increases the complexity of the distribution system 100. For example, the Maximum Receive Unit (MRU) negotiated by the PPP-LCP (Link Control Protocol) in the client-side ADSL modem 106 is typically 1492 bytes, while the Maximum Transmit Unit for the first and second Ethernet networks is typical 1500 bytes. Because of this, when transmitting packets, such as Internet Protocol (IP) packets, from the customer Ethernet networks 116, 118 to the service provider 104, packet fragmentation is required.
FIG. 2 shows an example of IP packet fragmentation performed at the first gateway 112 according to the prior art. Please note that the IP packet fragmentation operation performed at the second gateway 114 is the same as that described in FIG. 2. An incoming Ethernet frame 200 includes a 14-byte Ethernet header, and a 1500-byte Ethernet payload comprising an incoming IP packet 202. The IP packet 202 includes a 20-byte IP header and a 1480-byte payload. As shown in FIG. 2, the incoming IP packet 202 is fragmented by the gateway 112 into a first outgoing IP packet 204 and a second outgoing IP packet 208. The first outgoing IP packet 204 includes a 20-byte first outgoing IP header and a 1472-byte first IP fragment, and is included in a first outgoing PPPoE frame 206, which additionally includes a 14-byte Ethernet header and an 8-byte PPPoE header. The second outgoing IP packet 208 includes a 20-byte second outgoing IP header and an 8-byte second IP fragment, and is included in a second outgoing PPPoE frame 208, which additionally includes a 14-byte Ethernet header and an 8-byte PPPoE header. As shown in FIG. 2, to make room for the 8-byte PPPoE header, the 1480-byte incoming IP payload is fragmented into the 1472-byte first outgoing IP fragment and the 8-byte second outgoing IP fragment.
FIG. 3 shows the usage of a plurality of buffers internal to the gateway 112 when fragmenting an incoming IP packet as shown in FIG. 2. As an example, FIG. 3 shows twelve buffers (Buffer 1 to Buffer 12), wherein each buffer provides 128-bytes of data storage. A 14-byte outgoing Ethernet header (Eth) and an 8-byte PPPoE header for the first outgoing PPPoE frame 206 are generated and stored in Buffer 1. Additionally, as well known to a person skilled in the art, the original 20-byte IP header has the MF, Offset, Length, and Checksum fields modified in accordance with the first fragment (Fragment 1), which is stored starting in the last 86-bytes of Buffer 1 through to the first 106-bytes of Buffer 12. When transmitting the first outgoing PPPoE frame 206 and the second outgoing PPPoE frame 210, the gateway 112 transmits the data in the buffers in order from Buffer 1 to Buffer 12. When reaching the last 8 bytes (Fragment 2 as indicated by the Copy point in FIG. 3) the gateway 112 needs to generate a new Ethernet header and PPPoE header. Additionally, the IP header stored in Buffer 1 needs to have the MF, Offset, Length, and Checksum fields of the IP header stored in Buffer 1 modified in accordance with the last 8-bytes (Fragment 2). Afterwards, the new Ethernet header, the new PPPoE header, the modified IP header, and Fragment 2 are transmitted as the second outgoing PPPoE frame. At this point, the gateway 112 no longer needs the information stored in Buffers 1 to 12 and these buffers can be freed for use in storing a next incoming packet or for use in another task. In other words, the IP header in Buffer 1 must be preserved until after the second outgoing PPPoE frame is sent. As such, the method of fragmentation according to the prior art involves inefficient use of the available gateway 112 buffer resources.